package com.cocos.game;

import com.google.gson.JsonElement;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;

import java.lang.reflect.Type;

public class ResultCodeEnumSerializer implements JsonSerializer<ResultCodeEnum> {
    @Override
    public JsonElement serialize(ResultCodeEnum src, Type typeOfSrc, JsonSerializationContext context) {
        return new JsonPrimitive(src.getCode());
    }
}